package com.jingtao.controller;

import com.jingtao.pojo.Rights;
import com.jingtao.pojo.User;
import com.jingtao.service.RightsService;
import com.jingtao.service.UserService;
import com.jingtao.vo.SysResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/rights")
public class RightsController {

    @Resource
    private RightsService rightsService;

    @GetMapping("/getRightsList")
    public SysResult getRightsList(){
        //返回的是一级菜单数据（children包含二级数据）
        List<Rights> rights = rightsService.getRightsList();
        return SysResult.sucess(rights);
    }


}
